package com.mkydy.develop.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Data;

@Data
@TableName(value = "springboot_mybatis_plus_user")
public class User implements Serializable {
	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 3594328953244634063L;
	// value与数据库主键列名一致，若实体类属性名与表主键列名一致可省略value
	@TableId(value="user_id", type = IdType.AUTO)
	private Long id;
	
	// 若没有开启驼峰命名，或者表中列名不符合驼峰规则，可通过该注解指定数据库表中的列名，exist标明数据表中有没有对应列
	@TableField(value = "user_name", exist = true)
    private String name;
	@TableField(value = "user_age", exist = true)
    private Integer age;
	@TableField(value = "user_email", exist = true)
    private String email;
	@TableField(value = "user_create_time", exist = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date buildTime;
}
